home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
MiscKit1.7.1
/
MiscKitArchive.mbox
/
mbox
/
000226_misckit-reques…aska.et.byu.edu_Wed Jun 15 10:58:19 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1994-10-30
|
6KB
Return-Path: <misckit-request@alaska.et.byu.edu>
Received: from alaska.et.byu.edu by darth.byu.edu (NX5.67d/NX3.0M)
id AA07187; Wed, 15 Jun 94 10:58:10 -0600
Received: from darth.byu.edu by alaska.et.byu.edu; Wed, 15 Jun 1994 10:57:17 -0600
Received: by darth.byu.edu (NX5.67d/NX3.0M)
id AA07174; Wed, 15 Jun 94 10:56:27 -0600
Date: Wed, 15 Jun 94 10:56:27 -0600
From: Don Yacktman <don@darth.byu.edu>
Message-Id: <9406151656.AA07174@darth.byu.edu>
Received: by NeXT.Mailer (1.100.RR)
Received: by NeXT Mailer (1.100.RR)
To: misckit@alaska.et.byu.edu
Subject: FTPConnection
Reply-To: don@darth.byu.edu
This was posted to the misckit-request and looks like it was
meant for misckit, so I am forwarding it for all to see...
Two comments from me: (To be read after reading below.)
(1) "MiscFTPConnection" will become the name of the object as
Georg suggests.
(2) His comment on why he doesn't use MiscStrings is perfectly
reasonable for the time being. However, I hope to have a light
weight string class at some point that could be used in situations
like this. It would rely upon the Object class and not much more;
definitely free of the AppKit dependencies currently in MiscString.
That should, in theory, solve the problem Georg mentions...
---
Later,
-Don Yacktman
Don_Yacktman@byu.edu
Begin forwarded message:
Date: Wed, 15 Jun 1994 11:14:27 +0200
From: Georg Tuparev <tuparev@EMBL-Heidelberg.DE>
Subject: FTPCommection
To: misckit-request@byu.edu
Reply-To: tuparev@EMBL-Heidelberg.DE
Content-Transfer-Encoding: 7BIT
Hi MiscKiters,
That's the h-file for the "final" pre-alpha 0.1 version of my
STFTPConnection class (the final name will be
MiscFTPConnection, I presume). Thanks for all suggestions
and/or comments. I cannot satisfy all the proposals, but I
try to do my best...
J.B. Nicholson-Owens and others wrote:
> - change all the (const char *) to MiscStrings or suitable
> subclasses.
The primary purpose of the class (at least within the
SciTools project) is to to be used in daemons. I know how
nice MiscXXXX classes are, but I have to keep the objects as
small as possible. In the future (I hope in this century)
I'll subclass STFTPConnection and add several user/programmer
friendly methods.
I hope to submit this version before my vacation. Further
suggestions and comments are welcome.
-- georg --
========================================================================
#import <appkit/appkit.h>
#define ST_FTP_OK 0 // No error found
#define ST_FTP_CONF 1 // Connection failed
typedef struct st_f_time { // Human readable time-stamp
unsigned int year;
unsigned short month;
unsigned short day;
unsigned short hours;
unsigned short minutes;
} STFileTimestamp;
@interface STFTPConnection:Object
{
@private // All instance vars are privat!
id delegate;
int connection;
char *ftpHost;
char *ftpUser;
char *ftpPasswd;
int errNumb;
}
- init;
- initToHost:(const char *)host;
- initToHost:(const char *)host asUser:(const char *)name;
- initToHost:(const char *)host asUser:(const char *)name
withPassword:(const char *)passwd;
- initAnonymousToHost:(const char *)host;
- initAnonymousToHost:(const char *)host withPassword:(const char *)passwd;
- free;
- connect;
- connectAndKeepConnected;
- (BOOL)isConnected;
- resumeConnection;
- disconnect;
- setHost:(const char *)host;
- (char *)host;
- setUser:(const char *)name;
- (char *)user;
- setPassword:(const char *)passwd;
- (char *)password;
- setBinaryOn:(BOOL)binaryOn;
- (BOOL)isBinary;
- rootRemoteDir; // ... >cd /
- changeRemoteDir:(const char *)dir; // Full path
- (char *)currentRemoteDir;
- (char **)getRemoteSubDirs;
- (char **)getRemoteFileNames;
- rootLocalDir; // ... >cd /
- changeLocalDir:(const char *)dir; // Full path
- (char *)currentLocalDir;
- (char **)getLocalSubDirs;
- (char **)getLocalFileNames;
- getFile:(const char *)remoteFile;
- getFile:(const char *)remoteFile :(const char *)localFile;
- putFile:(const char *)localFile;
- putFile:(const char *)localFile :(const char *)remoteFile;
- getFiles:(const char **)remoteFiles;
- putFiles:(const char **)localFile;
- getAllFiles;
- putAllFiles;
- useCompression:(BOOL)flag;
- (BOOL)compression;
- setCompressionType:(const char *)aType; // "Z" or "gz"
- useDecompression:(BOOL)flag;
- (BOOL)decompression;
- (unsigned long)sizeForLocalFile:(const char *)fName;
- (STFileTimestamp *)timestampForLocalFile:(const char *)fName;
- (time_t)unixTimestampForLocalFile:(const char *)fName; // AU ... After Unix
- (BOOL)isLocalCompressed:(const char *)localFile; // .Z or .gz
- (unsigned long)sizeForRemoteFile:(const char *)fName;
- (STFileTimestamp *)timestampForRemoteFile:(const char *)fName;
- (time_t)unixTimestampForRemoteFile:(const char *)fName; // AU - After Unix
- (BOOL)isRemoteCompressed:(const char *)remoteFile; // .Z or .gz
- (int)errorNumb;
- (char *)error;
- setDelegate:aDelegate;
- delegate;
@end
@interface Object (STFTPConnectionDelegate)
- ftpConnectionDidClose:sender;
- ftpConnectionWillResume:sender; // Abort if nil
- ftpConnectionDidResume:sender;
- ftpConnection:sender willTransfer:(char *)fileName; // Abort if nil
- ftpConnection:sender didTransfer:(char *)fileName;
@end
========================================================================